Tiered storage refers to setting an existing storage device as disk tiers and setting different types of disks onto different tiers so that data can be migrated between different tiers according to data access requirements. For example, a solid state disk (SSD) set comprises a plurality of SSDs. Each of the SSDs is a high-tier disk characterized by a high access speed, and a hard disk drive (HDD) set comprises a plurality of HDDs. Each of the HDDS is a low-tier disk characterized by a low access speed. In the practice of tiered storage, infrequently accessed data is stored into a disk tier characterized by a low access speed such as a HDD set, and frequently accessed data is stored into a disk tier characterized by a high access speed such as a SSD set, and therefore, in accessing frequently used data, the data access speed and the storage device access efficiency are enhanced.
A disk generally stores data in the form of data blocks. Multiple storage units of the same size are set in the disk, and each storage unit is configured to store one data block. When data is migrated between different tiers, the data block as a whole is migrated. Even if only a part of data (called “hot data”) in the data block has an access frequency rising to a set threshold and needs to be migrated to a high-tier disk set, the data block as a whole is actually migrated. That is, the “cold data” (data whose access frequency is still low) in the data block moves together with “hot data”. The data block is generally called a “migration unit”, indicating that the data block is a unit of migration. In addition, the storage device further includes metadata storage resources used to store metadata, where the metadata is information corresponding to a migration unit, for example, a storage address of the migration unit, and each migration unit has corresponding metadata, and therefore, the consumption amount of the metadata storage resources is proportional to the number of migration units.
Currently, the size of the “migration unit” is generally fixed, such as 256 megabytes (MB). However, the setting of the migration units of a fixed size brings the following problems: if the set size of the migration unit is large, few metadata storage resources are consumed, but the phenomenon that cold data moves together with the hot data will lead to waste of the storage space of the expensive high-tier storage medium and low usage of space; and, if the set size of the migration unit is small, the waste of the high-tier storage medium is reduced naturally, but more metadata storage resources are consumed.